@import '~@alife/aisc-core/purple/scss/index.scss';
@import '~@alife/aone-core/variables/index';

$changes-container-left-width: 320px;
.changes-container {
  display: flex;
  position: relative;
  flex: 1;

  .changes-bar {
    display: block;
    height: auto;
    width: 1px;
    flex: none;
    background: $color-line1-2;
    margin-right: 16px;
    position: relative;
  }
  .changes-left-hide-toggle {
    // position: absolute;
    // left: 368px;
    // top: 140px;
    flex: none;
    position: -webkit-sticky;
    position: sticky;
    top: 150px;
    cursor: pointer;
    background: $color-line1-2;
    width: 12px;
    height: 46px;
    border-radius: 4px 0 0 4px;
    margin-top: 150px;
    &:after {
      content: '';
      width: 0;
      height: 0;
      top: 18px;
      left: -1px;
      position: absolute;
      border: 5px solid transparent;
      border-right: 5px solid $color-white;
    }
    &.collapse {
      // left: 0;
      // border-radius: 0 2px 2px 0;
      &:after {
        left: 5px;
        border-left: 5px solid $color-white;
        border-right: 5px solid transparent;
      }
    }
  }
  &-right {
    flex: auto;
    padding-top: 20px;
    padding-bottom: 40px;
    &.has-panel {
      padding-right: 300px;
      #J_file_List {
        padding: 0 20px;
      }
    }
  }
}

.changes-version {
  &-section {
    border-left: 0;
    border-right: 0;
    display: flex;
    align-items: center;
    font-size: 14px;
    margin-bottom: 12px;
    font-weight: bold;
    .version-select {
      width: 90px;
      min-width: 90px;
      margin: 0 8px;
      &:last-child {
        margin-right: 0;
      }
    }
  }
  &-item {
    padding: 4px 0;
    &-title {
      font-size: 14px;
      font-weight: bold;
      overflow: hidden;
      zoom: 1;
      .aisc-color-tag {
        float: right;
      }
    }
    &-desc {
      line-height: 18px;
      color: $color-text1-2;
    }
  }
}
.commits-list {
  font-size: 12px;
  .commit-item {
    margin-top: 10px;
    &-title {
      font-size: 14px;
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
      display: block;
      margin-bottom: 2px;
      .commit-status-icon {
        float: right;
      }
    }
  }
}

.file-top-bar {
  background: $color-white;
  z-index: 999;
  padding-right: 8px;
  padding-bottom: 4px;
  display: flex;
  align-items: center;
  &-tips {
    flex: auto;
    color: $color-text1-2;
  }
  &-item {
    flex: none;
    margin-left: 12px;
  }
}

.file-panel-list {
  margin-top: 4px;
}

// 文件头部切换是否显示评论的icon
.file-toggle-comment-btn {
  cursor: pointer;
  color: $color-b1-6;
  &:hover {
    color: $color-line1-2;
  }
  &.comment-hide {
    color: $color-line1-2;
    &:hover {
      color: $color-b1-6;
    }
  }
}

.aisc-color-tag-green {
  background-color: $color-success-4;
  border: 0;
}

#J_file_List {
  padding: 0 60px 0 20px;
  .file-panel-header {
    background: #fff;
  }
}

.mr-comment-icon {
  margin-right: 16px;
}

.mr-changes-large,
.mr-changes-none {
  padding: 40px 0 60px;
  background: #fff;
  .expire-text {
    display: flex;
    align-items: center;
  }
}

.no-data {
  margin-top: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.change-tab {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.back-to-top {
  position: fixed;
  right: 26px;
  bottom: 20px;
  z-index: 9;
  border-radius: 50%;
  height: 28px;
  cursor: pointer;
  width: 28px;
  border: 1px solid $gray-03;
  color: $gray-06;
  display: none;
  justify-content: center;
  align-items: center;
  transition: all 300ms;
  &:hover {
    color: $gray-02;
    background: $primary-brand;
    border: none;
  }
  &:active {
    color: $gray-02;
    background: $hover-brand;
    border: none;
  }
}

// 固定在右侧的icon
.changes-right-icon-wrapper {
  position: fixed;
  top: 180px;
  right: 20px;
  width: 24px;
  z-index: 2;
  & > div {
    margin-top: 20px;
    &:first-child {
      margin-top: 0;
    }
  }
  .mr-comment-icon {
    margin-right: 0;
  }
  &-guide {
    & > div {
      margin-top: 20px;
      &:first-child {
        margin-top: 0;
      }
    }
  }
}
